package com.xxgc.zde;

import com.baomidou.mybatisplus.core.toolkit.AES;

public class TextPassword {
    public static void main(String[] args) {
        String randomKey = "1234561234561234";
        System.out.println("randomKey ="+randomKey);
        //使用密钥加密数据
        String url = "jdbc:mysql://localhost:3306/zde?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC";
        String username = "root";
        String password = "hc050320";
        String encryptUrl = AES.encrypt(url, randomKey);
        String encryptUsername = AES.encrypt(username, randomKey);

        String encryptPassword = AES.encrypt(password, randomKey);
        System.out.println("encryptUrl ="+encryptUrl);
        System.out.println("encryptUsername ="+encryptUsername);
        System.out.println("encryptPassword ="+encryptPassword);

    }
}
